
        <?php include("header.php");?>
		<link rel="stylesheet/less" href="<?php echo ASTRA_THEME_URI; ?>css/new.less">
		<link rel="stylesheet/less" href="<?php echo ASTRA_THEME_URI; ?>css/detail.less">
        <?php include("nav.php");?>
			<div class="news-top">
				<div class="warp">
					<div class="link">
					
						<a href="<?php echo esc_url( home_url( '/' ) ); ?>">首页</a><span>></span><a href="<?php echo esc_url( home_url( '/' ) ); ?>cases">成功案例</a><span>></span><?php echo _get_category_post(get_current_category_id());?>
					</div>
					<div class="title"><?php the_title(); ?></div>
					<div class="icon_list">
						<div class="list">
							<img src="<?php echo ASTRA_THEME_URI; ?>img/pic/new-icon-1.svg"/><span><?php the_time('Y年n月j日'); ?></span>
						</div>
						<div class="list">
							<img src="<?php echo ASTRA_THEME_URI; ?>img/pic/new-icon-2.svg"/><span><?php bloginfo('name'); ?></span>
						</div>
					</div>
				</div>
			</div>
			<div class="detail-content">
							<div class="warp">
								<div class="detail-left">
									<div class="name" ><?php echo get_post_meta($post->ID, 'type_name', true); ?></div>
									<p>所属行业:<?php echo _get_category_post(get_current_category_id());?>
									<p>项目亮点:<span><?php echo get_post_meta($post->ID, 'type_excerpt', true); ?></span></p>
								</div>
								<div class="detail-center">
									<div class="single-box">
										<?php the_content(); ?>
									</div>
								</div>
								<div class="detail-right pc-show" >
									<div id="CeilingType" :class="{ CeilingType: fixed }">
									<a @click="goAnchor('#f1')">客户痛点</a>
									<a @click="goAnchor('#f2')">为什么选择勒兹</a>
									<a @click="goAnchor('#f3')">成果与价值</a>
									<a @click="goAnchor('#f4')">方案效果</a>
									</div>
								</div>
							</div>
						</div>
			
			
						<?php include("footer.php");?>
						<script>
							new Vue({
								el: '#app',
								data: function() {
									return {
										 offsetTop: 0, //上层控件的位置
			                             fixed:false
									}
								},
								created() {
			
								},
								mounted() {
									window.addEventListener('scroll', this.scrollToTop)
									this.$nextTick(() => {
									    this.offsetTop = 260;
										let element = this.$el.querySelector('.pic-img')
										let height = element.offsetHeight 
									});
								},
								destroyed() {
								    //移除监听
								    window.removeEventListener("scroll", this.scrollToTop);
								  },
								methods: {
									//锚点跳转
									goAnchor(selector) {
										document.querySelector(selector).scrollIntoView({
											behavior: "smooth"
										});
										 window.scrollTo(0, document.querySelector(selector).offsetTop - 60)
									},
									scrollToTop() {
										var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body
											.scrollTop;
										this.fixed = scrollTop > this.offsetTop ? true : false;
									},
								}
							})
						</script>
				</body>
			</html>